require(["common", "hash_routie", "coAjax", "queryString", "href", "serverNotify"], function(jSouper, hash_routie, coAjax, QueryString, href, serverNotify) {

	/*
	 * HASH路由
	 */
	hash_routie({
		html_url: "./pages/admin/",
		js_url: "./js/pages/admin/",
		hash_prefix: "admin/:page",
		default_hash: "orders",
		teleporter: "right"
	});
	coAjax.get(appConfig.bus.loginer, function(data) {
		busInfo = data.result;
		if (busInfo._id !== appConfig.bus_id) {
			href.toBusLogin();
		}
		App.set("bus_loginer", busInfo);
		// console.log(busInfo);
	}, function(errorCode, xhr, errorMsg) {
		console.log(errorCode);
		switch (errorCode) {
			case "JSON Parse Error":

				break;
			default:
				href.toBusLogin();
		}
	});
	//届时会换成"/"+appConfig.bus_id
	App.set("base_url", "");

	var bus_notify = serverNotify("bus");
	App.set("$Cache.bus_notify", bus_notify);
});